Table of contents

Conventions

The base URL to send all API requests is https://api.hyperping.io. HTTPS is required for all API requests.

The Hyperping API follows RESTful conventions when possible, with most operations performed via GETPOSTPUT, and DELETE. Response bodies are encoded as JSON.

API tokens are set at the project level.

Authorization

The metadata API uses token-based authentication. Users will need to paste their Hyperping project’s API key into your integration. To obtain your API token, go to the Developers tab in the left navigation bar**.**

Send the API key in the Authorization header of all your requests:

Authorization: Bearer $USER_API_KEY

Monitors API

Get all monitors

Returns a list of all monitors for a project.

GET /v1/monitors

Request example

curl <https://api.hyperping.io/v1/monitors> \\
  -H "Authorization: Bearer ${API_TOKEN}"

Response sample

200

[
	{
		"name": "API",
		"url": "<https://api.acme.com>",
		"uuid": "mon_OYKr5fpSDHqbP2",
		"paused": false,
		"protocol": "http",
		"projectUuid": "proj_IU6NdRUvdZSWz7",
		"port": null,
		"http_method": "GET",
		"regions": [
			"amsterdam",
			"london",
			"paris",
			"frankfurt"
		],
		"check_frequency": 30,
		"follow_redirects": true,
		"expected_status_code": "2xx",
		"request_body": "",
		"request_headers": [],
		"status": "up",
		"ssl_expiration": 365,
		"alerts_wait": 0
	}
]

Create a monitor

Creates a new monitor

POST /v1/monitors

Body params


name* string

Pronounceable name of the monitor


url* string

The URL of your website or host you want to ping


protocol string

The type of monitor: Can either be http, port or icmp.

http monitors must start with http or https. port and icmp can be IP addresses or hostnames.

Defaults to http


regions array

An array of region names the monitor will be pinged from.

Valid values are:["sanfrancisco", "nyc", "london", "paris", "frankfurt", "seoul", "mumbai", "bangalore", "saopaulo", "california", "virginia", "sydney", "toronto", "amsterdam", "singapore", "tokyo", "bahrain"]

Defaults to all regions.


check_frequency number

Check frequency in seconds.

Valid values are: 10 20 30 60 120 180 300 600 1800 3600 21600 43200 86400

Defaults to 30


http_method string

HTTP method to be used when protocol is set to http. Default is GET.

Valid values are: GET POST PUT HEAD DELETE PATCH OPTIONS

Defaults to GET


request_body string

Request body for POST, PUT, PATCH requests.


request_headers array

An optional array of objects of custom HTTP headers for the request. Set the name and value properties to form a complete header. (See example).


follow_redirects boolean

Should the ping follow redirects when sending the HTTP request?

Defaults to true


port number

Required if protocol is set to port .


expected_status_code string

A status code expected to receive from your http monitor.

Defaults to 2xx (200 - 299)


required_keyword string

Optional. Will trigger a downtime is the body response is missing this required keyword.

Defaults to "" (empty string).


paused boolean

Whether the monitor should be in active monitoring or paused.

Default is false.


alerts_wait number

When to send notifications after an outage has been detected, in minutes.

Valid values are: -1 0 1 2 3 5 10 30 60

-1 disables all alerts for this monitor.

0 to send alerts as soon as a downtime is detected.

Defaults to 0


escalation_policy string

Policy uuid to link the monitor to.

Valid value: policy_123 to link one.

Send null or "none"to unlink any escalation policy.

Update a monitor

Updates a monitor

PUT /v1/monitors/:uuid

Body params


name string

Pronounceable name of the monitor


url string

The URL of your website or host you want to ping


protocol string

The type of monitor: Can either be http, port or icmp.

http monitors must start with http or https. port and icmp can be IP addresses or hostnames.


regions array

An array of region names the monitor will be pinged from.

Valid values are:["sanfrancisco", "nyc", "london", "paris", "frankfurt", "seoul", "mumbai", "bangalore", "saopaulo", "california", "virginia", "sydney", "toronto", "amsterdam", "singapore", "tokyo", "bahrain"]


check_frequency number

Check frequency in seconds.

Valid values are: 10 20 30 60 120 180 300 600 1800 3600 21600 43200 86400


http_method string

HTTP method to be used when protocol is set to http. Default is GET.

Valid values are: GET POST PUT HEAD DELETE PATCH OPTIONS


request_body string

Request body for POST, PUT, PATCH requests.


request_headers array

An optional array of objects of custom HTTP headers for the request. Set the name and value properties to form a complete header. (See example).


follow_redirects boolean

Should the ping follow redirects when sending the HTTP request?


port number

Required if protocol is set to port .


expected_status_code string

A status code expected to receive from your http monitor.

Use 2xx to set the default value (200 - 299)


required_keyword string

Optional. Will trigger a downtime is the body response is missing this required keyword.

Defaults to "" (empty string).


paused boolean

Whether the monitor should be in active monitoring or paused.

Default is false.


alerts_wait number

When to send notifications after an outage has been detected, in minutes.

Valid values are: -1 0 1 2 3 5 10 30 60

-1 disables all alerts for this monitor.

0 to send alerts as soon as a downtime is detected.

Defaults to 0


escalation_policy string

Policy uuid to link the monitor to.